﻿using System;

namespace TextEditor
{
    

    public class A_InsertString : A_Action
    {
        public override string ActionName()
        {
            return "insertstring";
        }

        public override bool Execute()
        {
            base.myOwnerDocument.BeginContentChangeLog();
            base.myOwnerDocument.BeginUpdate();
            base.myOwnerDocument.Content.InsertString(base.Param1);
            base.myOwnerDocument.EndUpdate();
            base.myOwnerDocument.EndContentChangeLog();
            return true;
        }

        public override bool isEnable()
        {
            return (base.myOwnerDocument.CanModify() && base.isEnable());
        }
    }
}

